package fanxing.lianxi.demo03;

public class Genericity <T>{
    private T name;
    public T getName() {
        return name;
    }

    public void setName(T name) {
        this.name = name;
    }

    public Genericity(T name) {
        this.name = name;
    }

//    public void prinConn(){
//
//        System.out.println("你好" + name.getClass().getName() );
//    }

    public T staff() throws Exception{
        Class<?> clazz = name.getClass();
        Object object = clazz.getConstructor().newInstance();
        return (T) object;
    }
}
